var page = document.getElementById("page");
page.onclick = function () {
  openHtml()
}



function openHtml () {

  chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
    chrome.tabs.sendMessage(tabs[0].id,
      { todo: "参数1", "newRR1": '参数2' },
      function (res) {
        page.innerHTML = '<div  style="margin-bottom:10px" >已成功注入当前页面</div><a target="_blank" href="https://www.baidu.com?autoOpenFund">无法显示，点击此处</a>'

      })
  });
}

openHtml()